/* 播放器组件样式 */
.bottom-player {
  height: 100px;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
}

.control-buttons {
  display: flex;
  align-items: center;
  gap: 35px;
}

/* 音乐信息区域 */
.player-track-info {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 200px;
  max-width: 20%;
  width: 20%;
}

.player-cover {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.player-cover-placeholder {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #888;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.player-info {
  flex: 1;
  min-width: 0;
}

.player-title {
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
}

.player-artist {
  font-size: 14px;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-lyrics {
  font-size: 12px;
  color: #4ecdc4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
  font-style: italic;
}

/* 播放控制区域 */
.player-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 800px;
  flex: 1;
}

.controls-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-width: 250px;
}

.controls-right {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-width: 200px;
  max-width: 80%;
}

.control-btn {
  background: transparent;
  border: none;
  color: #ccc;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

/* 模式与收藏统一按钮风格，使用 .control-btn + .active 高亮 */

.control-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transform: scale(1.1);
}

.control-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.control-btn.active {
  color: #4ecdc4;
  background: rgba(78, 205, 196, 0.1);
}

/* 收藏按钮特殊样式 */
.control-btn.active[title*="收藏"] {
  color: #ffd700;
  background: rgba(255, 215, 0, 0.1);
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* 去掉图标方框背景，直接用emoji或文字即可 */

.play-btn-main {
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  border: none;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.play-btn-main:hover:not(:disabled) {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.play-btn-main:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* 进度条区域 */
.progress-section {
  display: flex;
  align-items: center;
  gap: 15px;
  width: 100%;
}

.time-display {
  color: #888;
  font-size: 12px;
  font-family: 'Courier New', monospace;
  min-width: 45px;
}

.progress-bar-container {
  flex: 1;
  position: relative;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  cursor: pointer;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  border-radius: 3px;
  transition: width 0.1s ease;
}

.progress-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.progress-slider:disabled {
  cursor: not-allowed;
}

/* 音量控制区域 */
.player-volume {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: end;
  min-width: 200px;
}

.volume-slider {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  appearance: none;
  width: 12px;
  height: 12px;
  background: #4ecdc4;
  border-radius: 50%;
  cursor: pointer;
}

.volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: #4ecdc4;
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

/* 播放列表面板 */
.playlist-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 380px;
  background: rgba(10, 10, 10, 0.98);
  backdrop-filter: blur(20px);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  animation: slideInRight 0.25s ease-out;
}

.playlist-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1500;
}

.playlist-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.playlist-header h3 {
  margin: 0;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}

.playlist-controls {
  display: flex;
  gap: 10px;
}

.playlist-clear-btn,
.playlist-close-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #ccc;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.3s ease;
}

.playlist-clear-btn:hover,
.playlist-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.playlist-clear-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.playlist-tracks {
  flex: 1;
  overflow-y: auto;
  padding: 10px 0;
}

.playlist-tracks::-webkit-scrollbar {
  width: 6px;
}

.playlist-tracks::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.playlist-tracks::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.playlist-tracks::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.playlist-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.playlist-item:hover {
  background: rgba(255, 255, 255, 0.1);
}

.playlist-item.active {
  background: linear-gradient(45deg, rgba(255, 107, 107, 0.2), rgba(78, 205, 196, 0.2));
  border-left: 3px solid #ff6b6b;
}

.playlist-item-info {
  flex: 1;
  min-width: 0;
}

.playlist-item-title {
  font-weight: 500;
  font-size: 14px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #fff;
}

.playlist-item-artist {
  font-size: 12px;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.playlist-item-duration {
  color: #888;
  font-size: 12px;
  font-family: 'Courier New', monospace;
}

.playlist-item-remove {
  background: transparent;
  border: none;
  color: #888;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: all 0.3s ease;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.playlist-item-remove:hover {
  background: rgba(255, 107, 107, 0.2);
  color: #ff6b6b;
}

.playlist-empty {
  padding: 40px 20px;
  text-align: center;
  color: #888;
}

.playlist-empty p {
  margin: 5px 0;
  font-size: 14px;
}

/* 歌词面板 */
/* KTV浮动歌词 */
.floating-lyrics {
  position: fixed;
  bottom: 110px;
  left: 50%;
  transform: translateX(-50%);
  width: 70vw;
  pointer-events: none;
  z-index: 1500;
}
/* 播放按钮右侧内联歌词 */
.controls-lyrics {
  background: rgba(0,0,0,0.25);
  padding: 8px 14px;
  border-radius: 8px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.controls-lyrics .lyrics-text {
  font-size: 18px; /* 字体更大 */
  font-weight: 600;
  background: linear-gradient(90deg, #ff6b6b, #ffd166, #4ecdc4);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.floating-lyrics-line {
  text-align: center;
  font-size: 18px;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
  background: rgba(0,0,0,0.35);
  padding: 8px 16px;
  border-radius: 8px;
}

.lyrics-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.lyrics-header h3 {
  margin: 0;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}

.lyrics-controls {
  display: flex;
  gap: 10px;
}

.lyrics-toggle-btn,
.lyrics-close-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #ccc;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.3s ease;
}

.lyrics-toggle-btn:hover,
.lyrics-close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.lyrics-toggle-btn.active {
  background: rgba(78, 205, 196, 0.2);
  color: #4ecdc4;
}

.lyrics-content {
  flex: 1;
  overflow-y: auto;
  padding: 10px 0;
}

.lyrics-content::-webkit-scrollbar {
  width: 6px;
}

.lyrics-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.lyrics-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.lyrics-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lyrics-loading {
  padding: 40px 20px;
  text-align: center;
  color: #888;
}

.lyrics-loading .loading-spinner {
  font-size: 2em;
  margin-bottom: 10px;
}

.lyrics-list {
  padding: 10px 20px;
}

.lyrics-line {
  padding: 8px 0;
  color: #888;
  font-size: 14px;
  transition: all 0.3s ease;
  border-radius: 6px;
  padding-left: 10px;
  margin: 2px 0;
}

.lyrics-line.active {
  color: #4ecdc4;
  background: rgba(78, 205, 196, 0.1);
  font-weight: 600;
}

.lyrics-empty {
  padding: 40px 20px;
  text-align: center;
  color: #888;
}

.lyrics-empty p {
  margin: 5px 0;
  font-size: 14px;
}

/* 动画效果 */
@keyframes slideInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* 响应式设计（窄屏额外修正，仅调整弹层宽度） */
@media (max-width: 768px) {
  .playlist-panel,
  .floating-lyrics {
    width: calc(100vw - 40px);
    left: 50%;
    transform: translateX(-50%);
  }
}



/* 大屏优化 */
@media (min-width: 1600px) {
  .bottom-player {
    grid-template-columns: 420px 1.6fr 420px;
    height: 110px;
    padding: 0 30px;
  }
  .controls-lyrics .lyrics-text { font-size: 20px; }
}

@media (max-width: 1600px) and (min-width: 1201px) {
  .control-buttons { gap: 15px; flex-wrap: wrap; }
}

/* 笔记本（中屏）优化 */
@media (max-width: 1200px) and (min-width: 901px) {
  .bottom-player {
    grid-template-columns: 320px 1fr 300px;
  }
  .control-buttons { gap: 10px; flex-wrap: wrap; }
  .controls-lyrics{ display: none; }
}

/* 手机端（小屏）布局：上下堆叠 */
@media (max-width: 900px) {
  .bottom-player {
    display: grid;
    grid-template-columns: 1fr;
    height: 180px;
    padding: 10px 12px 12px 12px;
    gap: 10px;
  }
  .lyrics-toggle { display: none !important; }
  .player-track-info { max-width: 100%; }
  /* 保持所有控件可见：同一列内分区排列 */
  .player-controls { flex-direction: column; align-items: stretch; gap: 8px; width: 100%; }
  .controls-left { align-items: center; }
  .controls-right { 
    justify-content: center; 
    min-width: auto;
    max-width: none;
  }
  .progress-section { width: 100%; gap: 8px; }
  .controls-lyrics { 
    display: none; 
  }
  .player-volume { 
    justify-content: center;
    min-width: auto;
  }
  .control-buttons { width: 250px; gap: 10px; flex-wrap: wrap; }
  .control-btn { width: 36px; height: 36px; }
  .play-btn-main { width: 48px; height: 48px; }
}

@media (max-width: 600px) {
  /* 小屏弹层宽度修正 */
  .playlist-panel,
  .floating-lyrics {
    width: calc(100vw - 40px);
    left: 50%;
    transform: translateX(-50%);
  }
}

/* 移动端音量控制 */
.mobile-volume-controls {
  display: none;
  align-items: center;
  gap: 8px;
  margin-left: 10px;
}

.mobile-volume-slider {
  width: 60px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.mobile-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  background: #4ecdc4;
  border-radius: 50%;
  cursor: pointer;
}

.mobile-volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: #4ecdc4;
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

/* 响应式设计 */
@media (max-width: 900px) {
  .player-controls {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .controls-left {
    flex-direction: row;
    gap: 8px;
    width: 100%;
    justify-content: space-between;
  }
  
  .control-buttons {
    justify-content: center;
    gap: 8px;
  }
  
  .mobile-volume-controls {
    display: flex;
  }
  
  .player-volume {
    display: none;
  }
  
  .controls-right {
    display: none;
  }
  
  .progress-section {
    width: 100%;
  }
  
  .progress-bar-container {
    flex: 1;
  }
  
  .time-display {
    font-size: 0.8em;
    min-width: 35px;
  }
  
  .player-track-info {
    padding: 8px 12px;
  }
  
  .player-cover {
    width: 40px;
    height: 40px;
  }
  
  .player-title {
    font-size: 0.9em;
  }
  
  .player-artist {
    font-size: 0.8em;
  }
  
  .player-lyrics {
    font-size: 0.7em;
    margin-top: 2px;
  }
}

@media (max-width: 480px){
  .controls-left .mobile-volume-controls .control-btn{
    display: none;
  }
  .controls-left .mobile-volume-controls .mobile-volume-slider{
    display: none;
  }
  .controls-left .mobile-volume-controls .player-list-btn{
    display: block;
  }
} 